var path=require('path');
var webpack=require('webpack');
const {VueLoaderPlugin} = require("vue-loader");

module.exports = {
    entry:'./app.js',
    output:{
        path:path.resolve(__dirname,'./dist'),
        publicPath:'/dist/',
        filename:'build.js'
    },
    devServer:{
        historyApiFallback:true,
        overlay:true
    },
    resolve:{
        extensions:['.js','.vue']
    },
    module:{
        rules:[
            {
                test: /\.css$/,
                use: [
                    'vue-style-loader',
                    'css-loader'
                ],
            },
            {
                test: /\.vue$/,
                loader:'vue-loader',
                options:{
                    loaders:{
                        'scss':[
                            'vue-style-loader',
                            'css-loader',
                            'sass-loader'
                        ],
                        'sass':[
                            'vue-style-loader',
                            'css-loader',
                            'sass-loader?indentedSyntax'
                        ]
                    }
                }
            }
        ]
    },
    plugins:[
        new VueLoaderPlugin()
    ]

}
